﻿{include file="public/header" /}
				<form method="post" class="form-x" action="?tab=upload">
					<div class="form-group">
						<div class="label">
						</div>
						<div class="field">
							<div class="alert alert-yellow input-auto" size="100">{:lang('sms')['tip']}<a target="_blank" href="https://www.alidayu.com/">{:lang('currency')['click_go']}</a></div>
						</div>
					</div>
					<div class="form-group">
						<div class="label">
							<label for="appkey">appkey</label>
						</div>
						<div class="field">
							<input type="text" class="input input-auto" id="appkey" name="appkey" value="{$data.appkey}" size="80" placeholder="{:lang('currency')['required']}" data-validate="required:{:lang('currency')['required']}" />
						</div>
					</div>
					<div class="form-group">
						<div class="label">
							<label for="appsecret">appsecret</label>
						</div>
						<div class="field">
							<input type="text" class="input input-auto" id="appsecret" name="appsecret" value="{$data.appsecret}" size="80" placeholder="{:lang('currency')['required']}" data-validate="required:{:lang('currency')['required']}" />
						</div>
					</div>
					<div class="form-group">
						<div class="label">
							<label for="sign">sign</label>
						</div>
						<div class="field">
							<input type="text" class="input input-auto" id="sign" name="sign" value="{$data.sign}" size="80" placeholder="{:lang('currency')['required']}" data-validate="required:{:lang('currency')['required']}" />
						</div>
					</div>
					<div class="form-group">
						<div class="label">
							<label for="template">{:lang('sms')['template']}</label>
						</div>
						<div class="field">
							<input type="text" class="input input-auto" id="template" name="template" value="{$data.template}" size="80" placeholder="{:lang('currency')['required']}" data-validate="required:{:lang('currency')['required']}" />
						</div>
					</div>
					<div class="form-button">
						<button class="button bg-main" type="submit">{:lang('form')['submit']}</button>
						<button class="button bg-green testsend" type="button">Test Send</button>
					</div>
					<br/>
					<div id="testsend" class="form-group hidden">
						<div class="label">
							{:lang('label')['status']}：
						</div>
						<div class="field">
							<div id="sms_return" class="alert alert-yellow input-auto" size="100"></div>
						</div>
					</div>
				</form>
			<script>
				layer.config({
					extend: 'extend/layer.ext.js'
				});
				$('.testsend').click(function(){
					var index = layer.prompt({title:'{:lang('label')['phone']}'},function(val){
						$.getJSON("__ROOT__/admin/sms/testsend.html",{phone:val},function(data){
							$("#testsend").removeClass('hidden');
							$("#sms_return").html(data);
							layer.close(index);
						});
					});
				});
			</script>
{include file="public/footer" /}